/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ie.tcd.cs.railtickets.server.domain;

import java.util.Date;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author Wenbo Sun
 */
@Entity
@DiscriminatorValue("PATH")
public class PathTime extends TimeTable {
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "path_id")
    private TravelPath path;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "route_time_id")
    private RouteTime routeTime;

    public PathTime() {
    }

    public PathTime(long id) {
        super(id);
    }

    public PathTime(Date startTime, double travelPeriod, TravelPath path, RouteTime routeTime) {
        super(startTime, travelPeriod);
        this.path = path;
        this.routeTime = routeTime;
    }

    public TravelPath getPath() {
        return path;
    }

    public void setPath(TravelPath path) {
        this.path = path;
    }

    public RouteTime getRouteTime() {
        return routeTime;
    }

    public void setRouteTime(RouteTime routeTime) {
        this.routeTime = routeTime;
    }



}
